package benchmarks.tpch.mongo.domain;

import java.util.Date;

public class Supplier extends TPCHDomain<Integer>{
//    TPCHLoaderMySQL.CastTypes.LONG,   // s_suppkey
//    TPCHLoaderMySQL.CastTypes.STRING, // s_name
//    TPCHLoaderMySQL.CastTypes.STRING, // s_address
//    TPCHLoaderMySQL.CastTypes.LONG,   // s_nationkey
//    TPCHLoaderMySQL.CastTypes.STRING, // s_phone
//    TPCHLoaderMySQL.CastTypes.DOUBLE, // s_acctbal
//    TPCHLoaderMySQL.CastTypes.STRING, // s_comment
    private int s_suppkey; //1 //primary
    private String s_name; //2
    private String s_address; //3
    private int s_nationkey; //4
    private String s_phone; //5
    private double s_acctbal; //6
    private String s_comment; //7

    @Override
    public void setInt(int pos, int value) {
        if (pos == 1) {
            s_suppkey = value;
        }
        else if (pos == 4) {
            s_nationkey = value;
        } else {
            System.out.println("Wrong pos");
        }
    }

    @Override
    public void setDouble(int pos, double value) {
        if (pos == 6) {
            s_acctbal = value;
        } else {
            System.out.println("Wrong pos");
        }
    }

    @Override
    public void setString(int pos, String value) {
        if (pos == 2) {
            s_name = value;
        }
        else if (pos == 3) {
            s_address = value;
        }
        else if (pos == 5) {
            s_phone = value;
        }
        else if (pos == 7) {
            s_comment = value;
        } else {
            System.out.println("Wrong pos");
        }
    }

    @Override
    public void setDate(int pos, Date value) {
        System.out.println("Wrong pos");
    }

    @Override
    public Integer getPrimaryKey() {
        return s_suppkey;
    }

    public int getS_suppkey() {
        return s_suppkey;
    }

    public void setS_suppkey(int s_suppkey) {
        this.s_suppkey = s_suppkey;
    }

    public String getS_name() {
        return s_name;
    }

    public void setS_name(String s_name) {
        this.s_name = s_name;
    }

    public String getS_address() {
        return s_address;
    }

    public void setS_address(String s_address) {
        this.s_address = s_address;
    }

    public int getS_nationkey() {
        return s_nationkey;
    }

    public void setS_nationkey(int s_nationkey) {
        this.s_nationkey = s_nationkey;
    }

    public String getS_phone() {
        return s_phone;
    }

    public void setS_phone(String s_phone) {
        this.s_phone = s_phone;
    }

    public double getS_acctbal() {
        return s_acctbal;
    }

    public void setS_acctbal(double s_acctbal) {
        this.s_acctbal = s_acctbal;
    }

    public String getS_comment() {
        return s_comment;
    }

    public void setS_comment(String s_comment) {
        this.s_comment = s_comment;
    }
}
